package fr.upmc.tep.LTree;

/**
 * Represents a node of a LTree.
 * 
 * @author Walrus
 *
 */
public class LNode{

	private String value;
	private LNode leftNode;
	private LNode rightNode;
	
	/**
	 * Default constructor.
	 */
	public LNode() {
		super();
	}
		
	/**
	 * Constructor setting the value, the left node, and the right node of the
	 * created LNode.
	 * @param val the value of this LNode.
	 * @param lnode the left node of this LNode.
	 * @param rnode the right node of this LNode.
	 */
	public LNode(String val, LNode lnode, LNode rnode) {
		this();
		this.value = val;
		this.leftNode = lnode;
		this.rightNode = rnode;
	}
	
	public String getValue() {
		return value;
	}

	public void setValue(String value) {
		this.value = value;
	}

	public LNode getLeftNode() {
		return leftNode;
	}

	public void setLeftNode(LNode leftNode) {
		this.leftNode = leftNode;
	}

	public LNode getRightNode() {
		return rightNode;
	}

	public void setRightNode(LNode rightNode) {
		this.rightNode = rightNode;
	}
	
	public String toString() {
		return "Vzaleur: "+ value;
	}
}
